using System;
using System.Diagnostics;

namespace ServiceRanking
{
    /// <summary>
    /// Summary description for Class1.
    /// </summary>
    class Class1
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            StopWordsHandler stopword = new StopWordsHandler();
            string[] doc = new string[] {
                "test tretr",
										   "test b c c dd d d d 6.5 d",
										   "a b c c c d dd d d 50 test"
										,   "c d b f y teyr etre tretr gfgd c",
										"r a e e f n l i f f 0 f f x l",
                                        ""
			};

            TFIDFMeasure tf = new TFIDFMeasure();
            tf.Init(doc);
            //Trace.WriteLine((double)Math.Log(10000/50) ) ;
            Trace.WriteLine(tf.GetSimilarity(0, 3));
            string[] _3grams = NGram.GenerateNGrams("TEXT", 3);

            for (int i = 0; i < doc.Length; i++)
            {
                string vector = "doc_" + i + ":";
                float[] v = tf.GetTermVector(i);
                string[] vs = new string[v.Length];
                for (int j = 0; j < v.Length; j++)
                    vs[j] = v[j].ToString();
                vector += String.Join(",", vs, 0, v.Length);
                Trace.WriteLine(vector + ";size=" + v.Length);
            }

            LargeFloatList list = new LargeFloatList();
            int z=99999;
            for (int i = 0; i < z; i++) {
                list.Add(i);
                Trace.WriteLine(i);
            }
            //list.ggg();
            for (int i = 0; i < list.Count; i++)
            {
                Trace.WriteLine(list[i]);
            }

            //
            // TODO: Add code to start application here
            //
        }
    }
}
